<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="ui" uri="http://com.am.tag"%>
<%@ include file="../common.jsp" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
	<title></title>
	<head>
	 <!-- 插入打印控件 -->
      <OBJECT  ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D075-4BE2-87FE-057188254255"
                  codebase="jatoolsPrinter.cab#version=8,6,0,0"></OBJECT>  
		
		<script type="text/javascript">
			function doPrint(how) { 
	   			 var myDoc = {
	   			 	settings:{paperName:'a4'},   // 选择a4纸张进行打印
	   			 	//settings:{orientation:2},   // 选择横向打印,1为纵向，2为横向
	   			 	//settings:{topMargin:100,
			                  //leftMargin:100,
			                  //bottomMargin:100,
			                  //rightMargin:100},   // 设置上下左距页边距为10毫米，注意，单位是 1/10毫米
			        //settings:{printer:'OKi5530'},//设置到打印机 'OKi5530'
			        
	        		documents: document,
	        		copyrights: '杰创软件拥有版权  www.jatools.com'
	   			 }; 
		   		 if (how == '打印预览...') {
		        	 jatoolsPrinter.printPreview(myDoc);} // 打印预览
		    	 else if (how == '打印...') {
		         	jatoolsPrinter.print(myDoc, false); // 打印前弹出打印设置对话框
		         	}
		    	else
		         	jatoolsPrinter.print(myDoc, false); // 不弹出对话框打印
			}
			
			$().ready(function(){
				var map = Dialog.getInstance("view").getParam("param");
				if(map != null)
	    		{
	    			Form.bindForm("winForm",map);
	    			var num = map['num'];
	    			var value = map['type'];
    				if(value == "0"){
    	  				$("#type").val("学生");
    	  			}else if(value == "1"){
    	  				$("#type").val("教职工");
    	  				$("#medicalCard").val("J" + num);
    	  			}else if(value == "2"){
    	  				$("#type").val("退休");
    	  				$("#medicalCard").val("T" + num);
    	  			}else if(value == "3"){
    	  				$("#type").val("离休");
    	  				$("#medicalCard").val("L" + num);
    	  			}else{
    	  				$("#type").val("其他");
    	  			}
	    		}
			});
		</script>
	</head>
	 <body style="overflow-x: hidden;overflow-y:hidden;">
	 	<input id="record_id" type="hidden" name="record_id">
	 	<input id="personId" type="hidden" name="personId">
	 	<div style="margin-left:300px;margin-top:30px;">
 				<ui:Permission value="doctor_diagnose_print">
 					<input type="button"  style="background:url(${path }/images/common/hp_printer.png); width:64px;height:64;border:0" onclick="doPrint('打印...')">
 				</ui:Permission>
 		</div>
		<div id="page1" style="text-align:center;padding-top:20px">
   			<fieldset style="width :75%; height: 20%;" >
			    <span style="font-size:30">广东技术师范学院</span><br/>
			    <span style="font-size:30">公费医疗卡</span>
			    <form id="winForm" name="winForm">
				    <table style="margin-top:15px">
				   		<tr>
				   			<td align="right">姓名</td>
				   			<td><input type="text" name="name" id="name" style="width:120px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   			<td>性别</td>
				   			<td><input type="text" name="sex" id="sex" style="width:50px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   		</tr>
				   		
				   		<tr>
				   			<td>出生年月</td>
				   			<td><input type="text" name="birthday" id="birthday" style="width:120px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   			<td>类型</td>
				   			<td><input type="text" name="type" id="type" style=";width:50px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   		</tr>
				   		
				   		<tr>
				   			<td align="right">卡号</td>
				   			<td colspan="3"><input type="text" name="card_num" id="card_num" style="width:300px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   		</tr>
				   		
				   		<tr>
				   			<td>所在单位</td>
				   			<td colspan="3"><input type="text" name="departments" id="departments" style="width:300px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:black 1px solid;text-align:center" ></td>
				   		</tr>
				   	</table>
			   	</form>
		   		<input type="text" name="medicalCard" id="medicalCard" style="width:300px;BORDER-RIGHT: medium none;BORDER-TOP: medium none;BORDER-LEFT: medium none;BORDER-BOTTOM:medium none;" >
		   </fieldset>	
		</div>	
   	
  </body>
</html>

